package br.fbc.interceptor;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class RequestInterceptor extends AbstractInterceptor {

	
	public String intercept(ActionInvocation invocation) throws Exception {
		try{
			HttpServletRequest request = ServletActionContext.getRequest();
			if(null == request)				
				return "catch_Exception";
		}catch (Exception e) {			
			return "catch_Exception";
		}
		
		
		return invocation.invoke();
		
	}
}
